package com.jt.service;

import com.jt.mapper.UserMapper;
import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> findAll(){
        return userMapper.findAll();
    }
    @Override
    public User findUserById(Integer id){
        return userMapper.findUserById(id);
    }
    //以下为框架作业
    @Override
    public User findUserNA(String name,Integer age){
        return userMapper.findUserNA(name,age);
    }
    @Override
    public List<User> findUserLike(String name){
        return userMapper.findUserLike(name);
    }
    @Override
    public List<User>findUserByIds(List<Integer> id){

        return userMapper.findUserByIds(id);
    }
    @Override
    public List<User>findUserWhere(Integer id,String name,Integer age,String sex){
        return userMapper.findUserWhere(id,name,age,sex);
    }
    @Override
    public void updateUser(User user){

         userMapper.updateUser(user);
    }
    @Override
    public List<User> findUserByIds2(Integer[] id){
        return userMapper.findUserByIds2(id);
    }
    @Override
    public User getUserById(Integer id){
        return userMapper.getUserById(id);
    }
    @Override
    public List<User> findUserByNS(User user){
        return userMapper.findUserByNS(user);
    }
    @Override
    public List<User> findOneUser(User user){
        return userMapper.findOneUser(user);
    }
    @Override
    public void saveUser(User user){
        userMapper.saveUser(user);
    }
    @Override
    public void deleteUser(User user){
        userMapper.deleteUser(user);
    }
    @Override
    public List<User> findSome(User user){
        return userMapper.findSome(user);
    }
}
